<template>
	<view>
		<u-sticky bgColor="#6492FF" offsetTop=0 customNavHeight=0>
			<navbox title="游戏试玩"></navbox>
		</u-sticky>

		<view class="" v-if="isshow">
			<view class="bg">
			
			</view>
			<view class="con">
				<image src="/static/img/home/pic.png" class="con__pic" mode="widthFix"></image>
				<view class="con__box">
					<view class="con__box__data">
						<view class="con__box__data__item">
							<view class="con__box__data__item__num">
								{{info.swIncome.toFixed(2)}}
							</view>
							<view class="con__box__data__item__text">
								试玩收入
							</view>
						</view>
						<view class="con__box__data__line">
			
						</view>
						<view class="con__box__data__item">
							<view class="con__box__data__item__num">
								{{info.tjIncome.toFixed(2)}}
							</view>
							<view class="con__box__data__item__text">
								推广收入
							</view>
						</view>
					</view>
				</view>
				<view class="con__box">
					<view class="u-flex u-flex-y-center">
						<image src="/static/img/home/fjyq.png" class="con__box__fjyq" mode=""></image>
						<view class="con__box__title">
							试玩说明
						</view>
					</view>
					<view class="con__box__con">
						<u-parse :content="info.swInfo" selectable></u-parse>
					</view>
				</view>
				<view class="con__box">
					<view class="u-flex u-flex-y-center">
						<image src="/static/img/home/fjyq.png" class="con__box__fjyq" mode=""></image>
						<view class="con__box__title">
							推广说明
						</view>
					</view>
					<view class="con__box__con">
						<u-parse :content="info.tjInfo" selectable></u-parse>
					</view>
				</view>
				<view class="con__box">
					<view class="u-flex u-flex-y-center">
						<image src="/static/img/home/fjyq.png" class="con__box__fjyq" mode=""></image>
						<view class="con__box__title">
							注意事项
						</view>
					</view>
					<view class="con__box__con">
						<u-parse :content="info.warnInfo" selectable></u-parse>
					</view>
				</view>
			</view>
			<view class="footer">
				<view class="footer__btn" @click="navto('/pages/home/webview')">
					开始赚钱
				</view>
			</view>
		</view>
		
		
		
		
		
	</view>
</template>

<script>
	import {
		tjorder
	} from '@/api/home.js'
	export default {
		data() {
			return {
				info: {},
				isshow:true
			};
		},
		methods: {
			// tozq() {
			// 	var wv = plus.webview.create('/pages/home/games', "dy", {
			// 		titleNView: {
			// 			backgroundColor: "#0066CC",
			// 			titleColor: '#000000',
			// 			titleText: '游戏中心',
			// 			autoBackButton: true,
			// 		}
			// 	});
			// 	wv.addEventListener("loaded", (function() { //android 可写外面   ios的js注入必须在页面加载完成后
			// 		console.log("开始注入js");
			// 		uni.showToast({
			// 			title: "开始注入",
			// 			icon: "none"
			// 		})
			// 		wv.appendJsFile('/utils/taojin-app.js')
			// 		console.log("注入js完成");
			// 	}));
			// 	wv.show();
			// 	var currentWebview = this.$mp.page.$getAppWebview(); //获取当前页面的webview对象
			// 	currentWebview.append(wv); //一定要append到当前的页面里！！！才能跟随当前页面一起做动画，一起关闭
			// }
		},
		onLoad(option) {
			tjorder().then(res => {
				if (res.data.code == 200) {
					this.info = res.data.data
				}
			})
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #ededed;
	}

	.bg {
		width: 750rpx;
		height: 146rpx;
		background: #6492FF;
		border-radius: 0rpx 0rpx 69rpx 69rpx;
	}

	.con {
		padding: 0 20rpx 100rpx;
		margin-top: -146rpx;

		&__pic {
			width: 710rpx;
			margin-bottom: 5rpx;
		}

		&__box {
			padding: 24rpx 40rpx 30rpx;
			background: #FFFFFF;
			border-radius: 14rpx;
			position: relative;
			margin-bottom: 25rpx;

			&__data {
				display: flex;
				align-items: center;
				justify-content: center;

				&__item {
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: center;
					width: 50%;
					padding-top: 28rpx;

					&__text {
						font-family: Source Han Sans SC;
						font-weight: 400;
						font-size: 26rpx;
						color: #3E3D3D;
						line-height: 26rpx;
						margin-top: 22rpx;
					}

					&__num {
						font-family: Source Han Sans SC;
						font-weight: bold;
						font-size: 33rpx;
						color: #3E3D3D;
						line-height: 25.69rpx;

					}
				}

				&__line {
					width: 1rpx;
					height: 53rpx;
					background: #D8D8D8;
				}
			}

			&__fjyq {
				width: 40.28rpx;
				height: 43.06rpx;
				margin-right: 27rpx;
			}

			&__con {
				font-family: Source Han Sans SC;
				font-weight: 400;
				font-size: 26rpx;
				color: #3E3D3D;
				line-height: 52rpx;
				margin-top: 20rpx;
			}

			&__title {
				font-family: Source Han Sans SC;
				font-weight: bold;
				font-size: 34rpx;
				color: #3E3D3D;
				line-height: 46rpx;
			}
		}
	}

	.footer {
		padding: 20rpx 0 0;
		width: 750rpx;
		position: fixed;
		bottom: 0;
		left: 0;

		&__btn {
			width: 750rpx;
			height: 80rpx;
			background: #6492FF;
			border-radius: 7rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-family: Adobe Heiti Std;
			font-weight: bold;
			font-size: 30rpx;
			color: #FFFFFF;
		}
	}
</style>